package cn.lyq.card.data.api

import cn.lyq.card.data.model.*
import cn.lyq.card.global.Const
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.Header
import retrofit2.http.POST

interface CourseService {

    @POST("api/v1/course")
    @FormUrlEncoded
    suspend fun getCourseList(
        @Field("page") page: Int,
        @Field("pagesize") pageSize: Int,
        @Field("course_type") type: Int,
        @Header("token") token: String = Const.token
    ): ResponseInfo<MutableList<CourseInfo>>

    @POST("api/v1/course_type")
    suspend fun getCourseType(
        @Header("token") token: String = Const.token
    ): ResponseInfo<MutableList<CourseTypeInfo>>

}